﻿using Inovout.Data.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KuaJing.Security.Domain
{
    public partial class Privilege 
    {
        private List<Privilege> _allChildren;
        public virtual List<Privilege> AllChildren
        {
            get
            {
                this._allChildren = new List<Privilege>();
                this._allChildren.Add(this);
                foreach (Privilege privilege in this.Children)
                {
                    this._allChildren.AddRange(privilege.AllChildren);

                }
                return this._allChildren;
            }
            set 
            {
                this._allChildren = value;
            }
        }
    }
}
